#ifndef CSerial_H
#define CSerial_H
#include <stdio.h>      // standard input / output functions
#include <stdlib.h>
#include <string.h>     // string function definitions
#include <unistd.h>     // UNIX standard function definitions
#include <fcntl.h>      // File control definitions
#include <errno.h>      // Error number definitions
#include <termios.h>    // POSIX terminal control definitions
#include <glog/logging.h>
#include <string>
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <iostream>
using namespace std;
class CSerial
{
public:
	CSerial();
	~CSerial();
	int setInterfaceAttribs(int fd, int speed, int parity);
	void setBlocking(int fd, int block);
	void writeData(int fd, std::string data);
	std::string readData(int fd);
	int openPort();
	/* data */
private:
	const std::string portName = "/dev/ttyACM0";
};
#endif //!CSerial_H
